import request from '@/config/axios'

export interface CourseWeldingVO {
  id: number
  taskNumber: string
  productNumber: string
  productName: string
  modelSpecification: string
  orderQuantity: number
  code: string
  partNumber: string
  partName: string
  drawingNumber: string
  partSpecification: string
  material: string
  specification: string
  planEndDate: localdate
  netSizeLength: number
  netSizeWidth: number
  cuttingSizeLength: number
  cuttingSizeWidth: number
  planQuantity: number
  reportQuantity: number
  completeQuantity: number
  differenceQuantity: number
  productionTeam: string
  deviceName: string
  deviceCode: string
  processPrice: number
  dictStatus: number
  creatorName: string
  updaterName: string
  planStartDate: localdate
  operator: string
  operatorJobNumber: string
  dictProcessName: number
}

// 查询生产管理-过程管理-焊接管理列表
export const getCourseWeldingPage = async (params) => {
  return await request.get({ url: `/produce/course-welding/page`, params })
}

// 查询生产管理-过程管理-焊接管理详情
export const getCourseWelding = async (id: number) => {
  return await request.get({ url: `/produce/course-welding/getDetail?id=` + id })
}

// 新增生产管理-过程管理-焊接管理
export const createCourseWelding = async (data: CourseWeldingVO) => {
  return await request.post({ url: `/produce/course-welding/create`, data })
}

// 修改生产管理-过程管理-焊接管理
export const updateCourseWelding = async (data: CourseWeldingVO) => {
  return await request.put({ url: `/produce/course-welding/update`, data })
}

// 删除生产管理-过程管理-焊接管理
export const deleteCourseWelding = async (id: number) => {
  return await request.delete({ url: `/produce/course-welding/delete?id=` + id })
}

// 导出生产管理-过程管理-焊接管理 Excel
export const exportCourseWelding = async (data) => {
  return await request.download({ url: `/produce/course-welding/export-excel`, data })
}

// 指派生产管理-过程管理-焊接管理
export const assignCourseWelding = async (data: CourseWeldingVO) => {
  return await request.put({ url: `/produce/course-welding/assign`, data })
}